module.exports   A
last analyzed

Complexity

Conditions 3
Paths 2

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 3
c 1
b 0
f 0
nc 2
dl 0
loc 7
rs 9.4285
nop 1
1
var fs = require('fs')
2
3
module.exports = function (app) {
4
  fs.readdirSync(__dirname).forEach(function (file) {
5
    if (file === 'index.js' || file.substr(file.lastIndexOf('.') + 1) !== 'js') {
6
      return
7
    }
8
    var name = file.substr(0, file.indexOf('.'))
9
    require('./' + name)(app)
10
  })
11
}
12